1 Transects

Plant Flowers Date lon lat ele Month Year julian
Glossoloma oblongicalyx 4 2015-10-19 -78.59093 0.130838 2270 October 2015 292
Gasteranthus quitensis 2 2016-10-17 -78.59770 0.120070 1940 October 2016 291
Kohleria affinis 1 2016-12-13 -78.59534 0.126746 2110 December 2016 348
Columnea ciliata 3 2014-02-27 -78.59934 0.116682 1960 February 2014 58
Columnea medicinalis 1 2014-04-23 -78.59372 0.128700 2130 April 2014 113
Drymonia teuscheri 3 2016-07-28 -78.59245 0.129393 2200 July 2016 210

2 Interactions

3 Phylogeny

4 Traits

Plant Flowers Date lon lat ele Month Year julian
Glossoloma oblongicalyx 4 2015-10-19 -78.59093 0.130838 2270 October 2015 292
Gasteranthus quitensis 2 2016-10-17 -78.59770 0.120070 1940 October 2016 291
Kohleria affinis 1 2016-12-13 -78.59534 0.126746 2110 December 2016 348
Columnea ciliata 3 2014-02-27 -78.59934 0.116682 1960 February 2014 58
Columnea medicinalis 1 2014-04-23 -78.59372 0.128700 2130 April 2014 113
Drymonia teuscheri 3 2016-07-28 -78.59245 0.129393 2200 July 2016 210

4.0.1 Total Flowers

4.1 Peak date

As range

4.2 Infer absences

4.3 Species elevation ranges

4.4 Species by transect matrix

Check date integrity

5 Count model of species phenology

## sink("model/Poisson_baseline.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dpois(alpha[Plant[x]])
##     
##     #Residuals
##     discrepancy[x] <- pow(Y[x] - alpha[Plant[x]],2)
##     
##     #Assess Model Fit
##     Ynew[x] ~ dpois(alpha[Plant[x]])
##     discrepancy.new[x]<-pow(Ynew[x] - alpha[Plant[x]],2)
##     
##     }
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(i in 1:Npreds){
##     
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[i] ~ dpois(alpha[Ypred_plant[i]])
##     
##     #squared predictive error
##     pred_error[i] <- pow(Ypred[i] - alpha[Ypred_plant[i]],2)
##     }
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dunif(0,100)
##     
##     } 
##     
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2926
##    Unobserved stochastic nodes: 3444
##    Total graph size: 16685
## 
## Initializing model

5.0.1 Evaluate convergence

5.0.2 Posterior estimates

5.0.3 Error by elevation for estimated data

6 Phylogeny

6.1 Attraction

## sink("model/Poisson_attraction.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##       #Observation of a flowering plant
##       Y[x] ~ dpois(p[x])
##       log(p[x]) <- alpha[Plant[x]] + e[Plant[x],Date[x]]
##   
##       #Residuals
##       discrepancy[x] <- pow(Y[x] - p[x],2)
##       
##       #Assess Model Fit
##       Ynew[x] ~ dpois(p[x])
##       discrepancy.new[x]<-pow(Ynew[x] - p[x],2)
##     
##     }
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(i in 1:Npreds){
##     
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[i] ~ dpois(p_new[i])
##     log(p_new[i])<-alpha[Ypred_plant[i]] + e[Ypred_plant[i],Ypred_date[i]]
##     
##     #squared predictive error
##     pred_error[i] <- pow(Ypred[i] - p_new[i],2)
##     }
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(k in 1:Dates){
##       e[1:Plants,k] ~ dmnorm(zeros[],tauC[,])
##     }
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=inverse(vCov*gamma)
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.0001)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma ~ dunif(0,20)
##     
##     #Strength of covariance decay
##     lambda_cov = 5
##     omega ~ dbeta(1,1)
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2926
##    Unobserved stochastic nodes: 3691
##    Total graph size: 37446
## 
## Initializing model

7 Get Chains

7.0.1 Evaluate convergence

7.0.2 Posterior estimates

Mean phylogenetic covariance

7.1 Decay in phylogenetic attraction

7.2 Repulsion

## sink("model/Poisson_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dpois(p[x])
##     log(p[x]) <- alpha[Plant[x]] + e[Plant[x],Date[x]]
##     
##     #Residuals
##     discrepancy[x] <- pow(Y[x] - p[x],2)
##     
##     #Assess Model Fit
##     Ynew[x] ~ dpois(p[x])
##     discrepancy.new[x]<-pow(Ynew[x] - p[x],2)
##     
##     }
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(i in 1:Npreds){
##     
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[i] ~ dpois(p_new[i])
##     log(p_new[i])<-alpha[Ypred_plant[i]] + e[Ypred_plant[i],Ypred_date[i]]
##     
##     #squared predictive error
##     pred_error[i] <- pow(Ypred[i] - p_new[i],2)
##     }
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(k in 1:Dates){
##     e[1:Plants,k] ~ dmnorm(zeros[],tauC[,])
##     }
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.0001)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma ~ dunif(0,20)
##     
##     #Strength of covariance decay
##     lambda_cov = 5
##     omega ~ dbeta(1,1)
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2926
##    Unobserved stochastic nodes: 3691
##    Total graph size: 37445
## 
## Initializing model

8 Get Chains

8.0.1 Evaluate convergence

8.0.2 Posterior estimates

Mean phylogenetic covariance martix

8.1 Decay in phylogenetic repulsion

9 Traits

9.1 Trait Attraction

## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2926
##    Unobserved stochastic nodes: 3691
##    Total graph size: 37602
## 
## Initializing model

10 Get Chains

10.0.1 Evaluate convergence

10.0.2 Posterior estimates

10.1 Decay in trait attraction

10.2 Repulsion

## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2926
##    Unobserved stochastic nodes: 3691
##    Total graph size: 37601
## 
## Initializing model

11 Get Chains

11.0.1 Evaluate convergence

11.0.2 Posterior estimates

11.1 Decay in trait repulsion

12 Interaction

12.1 Attraction

## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2926
##    Unobserved stochastic nodes: 3691
##    Total graph size: 37602
## 
## Initializing model

13 Get Chains

13.0.1 Evaluate convergence

13.0.2 Posterior estimates

Mean interaction covariance

13.1 Decay in interaction attraction

13.2 Repulsion

## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2926
##    Unobserved stochastic nodes: 3691
##    Total graph size: 37601
## 
## Initializing model

14 Get Chains

14.0.1 Evaluate convergence

14.0.2 Posterior estimates

Mean interaction covariance martix

14.1 Decay in interaction repulsion

15 Model Comparison

15.1 Alpha

The probability of occurrence.

15.2 E: The effect of autocorrelation on mean flowering intensity

15.3 Omega: The magnitude of the effect of autocorrelation on mean flowering occurrence

15.4 Gamma: The variance of the effect of autocorrelation on mean flowering occurrence

15.5 Effect of autocorrelation

15.6 Decay in autocorrelation effect

16 Model Fit

16.1 Bayesian pvalue

## # A tibble: 6 x 2
##   Model                       p
##   <chr>                   <dbl>
## 1 interaction_attraction  0.496
## 2 interaction_repulsion   0.493
## 3 phylogenetic_attraction 0.499
## 4 phylogenetic_repulsion  0.478
## 5 trait_attraction        0.493
## 6 trait_repulsion         0.483

16.2 Overall

Model mean lower upper
trait_repulsion 2.403488 2.067660 2.777328
phylogenetic_repulsion 2.401928 2.089825 2.756010
interaction_attraction 2.397541 2.078465 2.748293
trait_attraction 2.396152 2.061903 2.763182
interaction_repulsion 2.395384 2.060423 2.766459
phylogenetic_attraction 2.386300 2.060937 2.747023

16.2.1 Without baseline

16.3 By Species

Without baseline

Zoom in

16.4

17 Prediction

17.0.1 Tables

Model mean lower upper
phylogenetic_repulsion 44945.52819 143.77751 24583.10806
interaction_attraction 13514.19989 125.67589 16199.90203
interaction_repulsion 12485.29336 145.91250 22111.89305
trait_repulsion 10824.09536 136.25699 19154.36822
phylogenetic_attraction 10408.41226 129.25464 18591.64217
trait_attraction 5138.06417 131.15640 16484.32208
baseline 37.32947 37.01487 37.65308